package net.dodoman.collection;

import java.util.LinkedList;

public class MyQueue {

	private LinkedList<Object> ll = new LinkedList<Object>();

	public void put(Object o) {
		ll.addLast(o);
	}

	// 使用removeFirst()方法，返回队列中第一个数据，然后将它从队列中删除
	public Object get() {
		return ll.removeFirst();
	}

	public boolean empty() {
		return ll.isEmpty();
	}

	public static void main(String[] args) {
		MyQueue mq = new MyQueue();
		mq.put("zhangsan");
		mq.put("lisi");
		mq.put("wangwu");

		System.out.println(mq.get());
		System.out.println(mq.get());
		System.out.println(mq.get());
		System.out.println(mq.empty());

	}
}
